<?php

namespace app\home\controller\user;


//引入公共控制器
use app\common\controller\Home;
//引入Cookie
use think\Cookie;

class Record extends Home
{
  public function __construct()
  {
    //继承父类
    parent::__construct();
      //加载模型
      $this->BusinessModel = model('Business.Business');
      $this->RecordModel = model('Business.Record');
      $this->OrderModel = model('Subject.Order');
      $this->SubjectModel = model('Subject.Subject');
  }

    public function expense()
    {
    $business = $this->BusinessModel->find($this->auth->id);
    $order = $this->OrderModel->alias('c')->join('subject p', 'c.subid = p.id')->where(['busid' => $business['id']])->select();

    $this->assign([
      'business' => $business,
      'order' => $order
    ]);

      return $this->view->fetch();
    }

    public function recharge()
    {
      return $this->view->fetch();
    }
    
   
    
   
    
    public function search(){

      return $this->view->fetch();
  }
}
